//
//  TKXmppDelegate.h
//  TKIM
//
//  Created by liupm on 15/10/21.
//  Copyright © 2015年 liupm. All rights reserved.
//
#import "TKIMStatus.h"
#import "TKIMVideoChat.h"

@class TKIMMessage;

/**
 *  @Author lpm, 15-09-17 17:09:13
 *
 *  @brief  xmpp代理
 */
@protocol TKIMManagerDelegate <NSObject>

@optional

/**
 *  @Author lpm, 15-09-17 17:09:11
 *
 *  @brief  收到服务器的状态消息
 *
 *  @param xmppStream
 *  @param error
 */
-(void)didReceiveServerStatus:(TKIMStatus *)status;


/**
 *  @Author lpm, 15-09-17 17:09:54
 *
 *  @brief  好友列表返回
 *
 *  @param xmppStream
 *  @param friends
 */
-(void)didReceiveFriendList:(NSMutableArray *)friends;


/**
 *  @Author lpm, 15-09-17 16:09:37
 *
 *  @brief  收到添加好友请求
 *
 *  @param sender
 *  @param presence
 */
- (void)didReceiveFriendRequest:(NSString *)userId;


/**
 *  @author zhengrs, 16-01-26 10:01:37
 *
 *  @brief 收到添加好友请求
 *
 *  @param userId  谁发的好友请求
 *  @param message 请求话语
 */
- (void)didReceiveFriendRequest:(NSString *)userId requestMsg:(NSString *)message;


/**
 *  @Author lpm, 15-10-21 13:10:32
 *
 *  @brief  收到群组列表
 *
 *  @param groupList
 */
-(void)didReceiveGroupList:(NSMutableArray *)groupList;


/**
 *  @Author lpm, 15-10-21 13:10:32
 *
 *  @brief  收到群组列表
 *
 *  @param groupList
 */
-(void)didReceiveGroupList:(NSMutableArray *)groupList withError:(NSError *)error;


/**
 *  @Author lpm, 15-10-21 13:10:32
 *
 *  @brief  收到聊天室列表
 *
 *  @param groupList
 */
-(void)didReceiveRoomList:(NSMutableArray *)roomList;


/**
 *  @Author lpm, 15-09-16 13:09:17
 *
 *  @brief  收到消息(所有人的消息都会进此方法)
 *
 *  @param sender
 *  @param message
 */
- (void)didReceiveMessage:(TKIMMessage *)message;


/**
 *  @Author lpm, 15-09-16 13:09:17
 *
 *  @brief  收到用户消息（只有当前聊天的用户消息才会进此方法）
 *
 *  @param message
 */
- (void)didReceiveUserMessage:(TKIMMessage *)message;


/**
 *  @Author lpm, 15-09-16 13:09:17
 *
 *  @brief  收到房间消息（只有当前聊天的房间消息才会进此方法）
 *
 *  @param message
 */
- (void)didReceiveRoomMessage:(TKIMMessage *)message;


/**
 *  @Author lpm, 15-09-16 13:09:17
 *
 *  @brief  收到会话列表
 *
 *  @param sender
 *  @param message
 */
- (void)didReceiveConverse:(NSMutableArray *)converses;


/**
 *  @Author lpm, 15-09-17 17:09:54
 *
 *  @brief  用户搜索返回
 *
 *  @param xmppStream
 *  @param friends
 */
-(void)didReceiveUserSearchList:(NSMutableArray *)users;


/**
 *  @Author lpm, 15-11-07 11:11:50
 *
 *  @brief  消息已经发送
 *
 *  @param message
 */
-(void)didSendMessage:(TKIMMessage *)message error:(NSError *)error;


/**
 *  @Author lpm, 15-11-07 11:11:50
 *
 *  @brief  消息已经被读
 *
 *  @param message
 */
-(void)didReadMessage:(TKIMMessage *)message error:(NSError *)error;


/**
 *  @Author lpm, 15-11-07 11:11:50
 *
 *  @brief  文件发送进度
 *
 *  @param message
 */
-(void)didReceiveUploadProcess:(TKIMMessage<TKIMFileProtocol> *)message process:(CGFloat)process;


/**
 *  @Author lpm, 15-11-07 11:11:50
 *
 *  @brief  文件下载进度
 *
 *  @param message
 */
-(void)didReceiveDownLoadProcess:(TKIMMessage<TKIMFileProtocol> *)message process:(CGFloat)process;


/**
 *  @Author lpm, 15-11-07 11:11:50
 *
 *  @brief  视频语音请求返回
 *
 *  @param message
 */
-(void)didReceiveVideoVoiceChatRequestResult:(TKIMVideoChat *)data error:(NSError *)error;


/**
 *  @Author lpm, 15-11-07 11:11:50
 *
 *  @brief  视频语音请求
 *
 *  @param message
 */
-(void)didReceiveVideoVoiceChatRequest:(TKIMVideoChat *)data;


/**
 *  @Author lpm, 15-12-09 15:12:59
 *
 *  @brief  收到消息被清空事件
 *
 *  @param error
 */
-(void)didReceiveMessageClean:(NSError *)error;


/**
 *  @Author lpm, 15-12-17 10:12:41
 *
 *  @brief  收到app被杀死或者退出登录的事件
 */
-(void)didReceiveAppInterruption;


/**
 *  @Author lpm, 16-01-07 09:01:04
 *
 *  @brief  被踢出群组
 *
 *  @param groupName 组名
 */
-(void)didReceiveBeBanFromGroup:(TKIMRoom *)group;


/**
 *  @Author lpm, 16-01-08 10:01:46
 *
 *  @brief  群组解散
 *
 *  @param group
 */
-(void)didReceiveGroupDestroy:(TKIMRoom *)group;


/**
 *  @Author lpm, 16-07-13 16:07:05
 *
 *  @brief  群组禁言
 *
 *  @param group   群
 */
-(void)didReceiveGroupGag:(TKIMRoom *)group ;


/**
 *  @Author lpm, 15-09-17 17:09:54
 *
 *  @brief  好友分组列表返回
 *
 *  @param xmppStream
 *  @param friends
 */
-(void)didReceiveFriendGroupList:(NSMutableArray *)groups;


/**
 *  @Author lpm, 15-09-17 17:09:54
 *
 *  @brief  好友列表改变
 *
 */
-(void)didReceiveFriendListChange;


/**
 *  @Author lpm, 16-03-28 09:03:40
 *
 *  @brief  收到通知消息
 *
 *  @param notify 
 */
-(void)didReceiveNotification:(TKIMNotify *)notify;

@end


